import { Injectable } from '@angular/core';
import { _HttpClient } from '@delon/theme';

@Injectable({
  providedIn: 'root'
})
export class BasicDataService {

	baseUrl = 'tjpn4-handle-tally/bd/';
	api = {
		operationProcessPage: this.baseUrl + 'operationProcess/page',
		operationProcessList: this.baseUrl + 'operationProcess/list',
		operationProcessSubmit: this.baseUrl + 'operationProcess/submit',
		operationProcessRemove: this.baseUrl + 'operationProcess/remove?id=',

		teamTree: this.baseUrl + 'team/tree'
	};
	constructor(private http: _HttpClient) {
	}

	operationProcessPage(params: any) : any {
		return this.http.get(this.api.operationProcessPage, params);
	}

	operationProcessList(params: any) : any {
		return this.http.get(this.api.operationProcessList, params);
	}

	operationProcessSubmit(postData: any) : any {
		return this.http.post(this.api.operationProcessSubmit, postData);
	}

	operationProcessRemove(id: any): any {
		return this.http.post(this.api.operationProcessRemove + id);
	}

	teamTree() : any {
		return this.http.get(this.api.teamTree);
	}
}
